package bairui.international.console.web.controller.user;

import com.lianjing.sh.spring.web.controller.base.operate.OperateTarget;
import com.lianjing.sh.spring.web.controller.enhance.tab.TabContext;

import bairui.international.console.web.controller.user.account.C_User_Account_Edit_EditAccess;
import bairui.international.console.web.controller.user.grade.C_User_Grade_Page_PageAccess;
import bairui.international.console.web.controller.user.offset.C_User_Offset_Page_PageAccess;
import bairui.international.console.web.controller.user.order.C_User_Order_Page_PageAccess;
import bairui.international.console.web.controller.user.royalty.C_User_Royalty_Page_PageAccess;
import bairui.international.console.web.controller.user.user.C_User_User_Detail_DetailAccess;
import bairui.international.console.web.controller.user.withdraw.C_User_Withdraw_Page_PageAccess;
import bairui.international.model.type.Type_User;

public class Tab_User {

	public static void tab(TabContext tabContext, long userId, Type_User type_User){
		tabContext
			.add(new C_User_User_Detail_DetailAccess.DetailAccess.Operate(){
				@Override public String comment() {
					return "基本信息";
				}
				@Override public Object getId() {
					return userId;
				}
				@Override public OperateTarget target() {
					return OperateTarget.Popup;
				}
			})
			.add(new C_User_Order_Page_PageAccess.PageAccess.Operate(){
				@Override public String comment() {
					return "订单列表";
				}
				@Override public OperateTarget target() {
					return OperateTarget.Popup;
				}
				@Override public Object getUserId() {
					return userId;
				}
			});
		if(type_User == Type_User.StrategyPartner || type_User == Type_User.Partner){
			tabContext
				.add(new C_User_Royalty_Page_PageAccess.PageAccess.Operate(){
					@Override public String comment() {
						return "提成明细";
					}
					@Override public Object getUserId() {
						return userId;
					}
					@Override public OperateTarget target() {
						return OperateTarget.Popup;
					}
				});
		}
		if(type_User == Type_User.StrategyPartner || type_User == Type_User.Partner || type_User == Type_User.Agent){
			tabContext	
				.add(new C_User_Withdraw_Page_PageAccess.PageAccess.Operate(){
					@Override public String comment() {
						return "提现明细";
					}
					@Override public Object getUserId() {
						return userId;
					}
					@Override public OperateTarget target() {
						return OperateTarget.Popup;
					}
				})
				.add(new C_User_Grade_Page_PageAccess.PageAccess.Operate(){
					@Override public String comment() {
						return "积分明细";
					}
					@Override public Object getUserId() {
						return userId;
					}
					@Override public OperateTarget target() {
						return OperateTarget.Popup;
					}
				})
				.add(new C_User_Offset_Page_PageAccess.PageAccess.Operate(){
					@Override public String comment() {
						return "电子券";
					}
					@Override public Object getUserId() {
						return userId;
					}
					@Override public OperateTarget target() {
						return OperateTarget.Popup;
					}
				});
		}
		tabContext
			.add(new C_User_Account_Edit_EditAccess.EditAccess.Operate(){
				@Override public String comment() {
					return "账户信息";
				}
				@Override public Object getUserId() {
					return userId;
				}
				@Override public OperateTarget target() {
					return OperateTarget.Popup;
				}
			});
			
	}
	
}
